-
Notifications
You must be signed in to change notification settings - Fork 748
Add unsupported reason os_version and evaluation #6041
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
agners
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will raise a repair with the title "Unsupported system - os_version" and text "System is unsupported due to os_version. Use the link to learn more and how to fix this.". I guess the full string should be "Home Assistant OS version" 🤔
Ideally we get translation strings in for this release (similar to home-assistant/frontend#26190).
So this will mark everything older than 12.0 as unsupported (all HAOS installations with major version < (16 - 4)). From analytics, this are about 3.5% of users, around 11k according to opt-in statistics. This is well within ADR0015 supported version definition, so from that perspective we should be fine. But we should have documentation up on why we do this before promoting a Supervisor version with this code to stable.
sairon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stefan said it all, I agree with the deprecation proposal as well.
86f70cc to
81137ad
Compare
Good point. I'll put up a PR for that. I wonder if that should be a checklist item in the PR template? I guess its not that common but changes in But @agners your link confuses me. I didn't realize that was in the frontend codebase. Up until now I had been putting translation strings for these here: Do these not work? Or is there some reason we have to put this information in frontend as well? I'd prefer them to all be in the hassio component if possible to keep them in one place with the supervisor code in core... |
agners
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Hm, I see, it appears we have translations on both sides currently. It seems that for the repairs itself the hassio integration translations are used. But there is one place where we still use the frontend translations, namely in the System info page, where we show a list of unsupported/unhealthy reasons:
|
| if ( | ||
| not self.sys_os.available | ||
| or not (current := self.sys_os.version) | ||
| or not (latest := self.sys_os.latest_version) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've downgraded to OS 11.5 (which should be the last unsupported version) but it turns out this evaluation is actually not working correctly: this property has the latest version which we are allowed to upgrade, according to the OS upgrade path.
supervisor/supervisor/updater.py
Lines 276 to 285 in 8a1e6b0
| upgrade_map = data.get("hassos-upgrade", {}) | |
| if last_in_major := upgrade_map.get(str(self.sys_os.version.major)): | |
| if self.sys_os.version != AwesomeVersion(last_in_major): | |
| version = last_in_major | |
| elif last_in_next_major := upgrade_map.get( | |
| str(int(self.sys_os.version.major) + 1) | |
| ): | |
| version = last_in_next_major | |
| self._data[ATTR_HASSOS] = AwesomeVersion(version) |
For all recent major OS versions we mandate to upgrade to OS 15.2, so that property is 15.2. But 15 - 4 = 11, so the evaluation returns False. This pretty much makes all OS versions "supported" currently 🙈
I guess we have to store both, the absolutely latest version and the next version we are allowed to upgrade.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shoot. Right, the upgrade path 🙈

Proposed change
Only the last 4 versions of OS are supported. Add an evaluation that marks system as unsupported if running a version of OS older then that.
Type of change
Additional information
Checklist
ruff format supervisor tests)If API endpoints or add-on configuration are added/changed: